
/* First created by JCasGen Thu Nov 05 23:38:12 UYST 2009 */
package org.idtem.component.analisissintactico;

import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.FSGenerator;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.impl.FeatureImpl;
import org.apache.uima.cas.Feature;

/** 
 * Updated by JCasGen Tue Nov 10 23:03:50 UYST 2009
 * @generated */
public class SyntacticNode_Type extends BaseSyntacticFunction_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {return fsGenerator;}
  /** @generated */
  private final FSGenerator fsGenerator = 
    new FSGenerator() {
      public FeatureStructure createFS(int addr, CASImpl cas) {
  			 if (SyntacticNode_Type.this.useExistingInstance) {
  			   // Return eq fs instance if already created
  		     FeatureStructure fs = SyntacticNode_Type.this.jcas.getJfsFromCaddr(addr);
  		     if (null == fs) {
  		       fs = new SyntacticNode(addr, SyntacticNode_Type.this);
  			   SyntacticNode_Type.this.jcas.putJfsFromCaddr(addr, fs);
  			   return fs;
  		     }
  		     return fs;
        } else return new SyntacticNode(addr, SyntacticNode_Type.this);
  	  }
    };
  /** @generated */
  public final static int typeIndexID = SyntacticNode.typeIndexID;
  /** @generated 
     @modifiable */
  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.idtem.component.analisissintactico.SyntacticNode");
 
  /** @generated */
  final Feature casFeat_ChildFunctions;
  /** @generated */
  final int     casFeatCode_ChildFunctions;
  /** @generated */ 
  public int getChildFunctions(int addr) {
        if (featOkTst && casFeat_ChildFunctions == null)
      jcas.throwFeatMissing("ChildFunctions", "org.idtem.component.analisissintactico.SyntacticNode");
    return ll_cas.ll_getRefValue(addr, casFeatCode_ChildFunctions);
  }
  /** @generated */    
  public void setChildFunctions(int addr, int v) {
        if (featOkTst && casFeat_ChildFunctions == null)
      jcas.throwFeatMissing("ChildFunctions", "org.idtem.component.analisissintactico.SyntacticNode");
    ll_cas.ll_setRefValue(addr, casFeatCode_ChildFunctions, v);}
    
   /** @generated */
  public int getChildFunctions(int addr, int i) {
        if (featOkTst && casFeat_ChildFunctions == null)
      jcas.throwFeatMissing("ChildFunctions", "org.idtem.component.analisissintactico.SyntacticNode");
    if (lowLevelTypeChecks)
      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_ChildFunctions), i, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_ChildFunctions), i);
  return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_ChildFunctions), i);
  }
   
  /** @generated */ 
  public void setChildFunctions(int addr, int i, int v) {
        if (featOkTst && casFeat_ChildFunctions == null)
      jcas.throwFeatMissing("ChildFunctions", "org.idtem.component.analisissintactico.SyntacticNode");
    if (lowLevelTypeChecks)
      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_ChildFunctions), i, v, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_ChildFunctions), i);
    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_ChildFunctions), i, v);
  }
 
 
  /** @generated */
  final Feature casFeat_Function;
  /** @generated */
  final int     casFeatCode_Function;
  /** @generated */ 
  public String getFunction(int addr) {
        if (featOkTst && casFeat_Function == null)
      jcas.throwFeatMissing("Function", "org.idtem.component.analisissintactico.SyntacticNode");
    return ll_cas.ll_getStringValue(addr, casFeatCode_Function);
  }
  /** @generated */    
  public void setFunction(int addr, String v) {
        if (featOkTst && casFeat_Function == null)
      jcas.throwFeatMissing("Function", "org.idtem.component.analisissintactico.SyntacticNode");
    ll_cas.ll_setStringValue(addr, casFeatCode_Function, v);}
    
  



  /** initialize variables to correspond with Cas Type and Features
	* @generated */
  public SyntacticNode_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());

 
    casFeat_ChildFunctions = jcas.getRequiredFeatureDE(casType, "ChildFunctions", "uima.cas.FSArray", featOkTst);
    casFeatCode_ChildFunctions  = (null == casFeat_ChildFunctions) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_ChildFunctions).getCode();

 
    casFeat_Function = jcas.getRequiredFeatureDE(casType, "Function", "uima.cas.String", featOkTst);
    casFeatCode_Function  = (null == casFeat_Function) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_Function).getCode();

  }
}



    